package com.aob.dao;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class BaseDao {
    protected static String myEmailAccount;
    protected static String myEmailPsw;
    protected static String myEmailSMTPHost;

    protected static String accessKeyId;
    protected static String accessKeySecret;

    static {
        Properties params = new Properties();
        String configName = "code.properties";
        InputStream in = BaseDao.class.getClassLoader().getResourceAsStream(configName);
        try {
            params.load(in);
        } catch (IOException e) {
            e.printStackTrace();
        }
        myEmailAccount = params.getProperty("email.myEmailAccount");
        myEmailPsw = params.getProperty("email.myEmailPsw");
        myEmailSMTPHost = params.getProperty("email.myEmailSMTPHost");


        accessKeyId = params.getProperty("sms.accessKeyId");
        accessKeySecret = params.getProperty("sms.accessKeySecret");
    }
}
